import React from 'react';
import { Row, Col, Input, InputNumber } from 'antd';
import Image from 'components/Image'
const rowNum = 3;

export default [
    {
        title: "选择退货商品",
        dataIndex: "goodImg",
        className: "bdr0",
        width: 500,
        render: (v, record, index) => {
            return {
                children: <div className="order-goods-item">
                    <Row>
                        <Col span={18}>
                            <div className="order-goods-info">
                                <Image className="ant-table-row-img" src={record.picUrl} alt={record.itemName} width={70} height={70} />
                                <p className="good-name">{record.itemName}</p>
                                <p className="t-grayer good-spec">{!!record.productSpecification ? `规格：${record.productSpecification}` : ''}</p>
                                <p className="t-grayer">商家编码：{record.articleNo}</p>
                            </div>
                        </Col>
                        <Col span={4} offset={1}>
                            <div className="goods-price t-right">
                                <p className="real-price"><span>&yen;{record.pervalue}</span></p>
                                <p className="t-grayer">&times;{record.itemNumber}</p>
                            </div>
                        </Col>
                    </Row>
                </div>,
                props: {
                    colSpan: 2
                }
            }
        }
    },
    {
        title: "销售单价",
        width: 100,
        className: "ant-table-th-right",
        dataIndex: "realPrice",
        render: () => {
            return {
                children: {},
                props: {
                    colSpan: 0
                },
            }
        }
    },
    {
        title: "退货数量",
        width: 100,
        className: "ant-table-th-center va-t",
        dataIndex: "buyNum",
        render: (v, record, index) => <div className="buy-num">
            <InputNumber min={0} max={record.returnedItemNum} defaultValue={record.returnedItemNum} className="t-center" />
            <p className="t-center t-grayer mt3">最多可选{record.returnedItemNum}件</p>
        </div>
    },
    {
        title: "实付金额（可退）",
        width: 250,
        className: "ant-table-th-center",
        dataIndex: "realPay",
        render: (v, record, index) => <div className="t-center t-price font-14">&yen;{record.pervalue}</div>
    }
]
